/* 
 * Enterprise Library Extensions - DI + ORM.
 * Copyright (C) 2006
 *
 * GNU General Public License
 *
 * This program is free software; you can redistribute 
 * it and/or modify it under the terms of the GNU General Public License 
 * as published by the Free Software Foundation; either version 2 of the 
 * License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful, but 
 * WITHOUT ANY WARRANTY; without even the implied warranty of 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
 * See the GNU General Public License for more details.
 */
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace ELE.EnterpriseLibrary.Test 
{
  /// <summary>
  /// Summary description for BaseFixture.
  /// 
  /// Author : Miguel Curi
  /// 
  /// </summary>
  /// 
  // TODO:  This should be used as the base for all test classes in all
  //        test projects
  public abstract class BaseFixture
  {
    [TestInitialize]
    public void Init()
    {

      //if(!InitialContext.Initialized)
      //{
      //  // This is needed to start up the context because NUnit is wrapping up this code 
      //  // at runtime so the results of the app.config
      //  // settings are unknown. We assume the installer has been ran
      //  System.Reflection.Assembly a = System.Reflection.Assembly.GetAssembly(this.GetType());

      //  string loc = FileUtil.EMBEDDED_RESOURCE + a.FullName + ":App.config";
      //  ConfigFileReader reader = new ConfigFileReader(loc);
      //  Console.WriteLine("Assembly.Location : {0}", a.Location);
      //  Console.WriteLine("Assembly.CodeBase : {0}", a.CodeBase);
      //  Console.WriteLine("Settings : {0}", reader.AppSettings[InitialContext.CONTEXT_SETTINGS_KEY_NAME]);
      //  InitialContext.StaticInit((string)reader.AppSettings[InitialContext.CONTEXT_SETTINGS_KEY_NAME]);
      //}
    }
  }
}
